<template>
  <!-- <div class="home">Hello, {{ userInfoStore.name }}</div> -->
  <div class="home">
    <Montior />
    <Sales></Sales>
    <Search></Search>
  </div>
</template>

<script lang="ts">
export default {
  name: "Home",
};
</script>
<script lang="ts" setup>
import { useUserInfoStore } from "@/stores/userInfo";
import { useReportDataStore } from '@/stores/reportData'
import { onMounted } from "vue";
import Sales from '../home/sales/index.vue'
import Montior from './monitor/index.vue'
import Search from './search/index.vue'

const userInfoStore = useUserInfoStore();
//获取首页数据
const reportDataStore = useReportDataStore()

onMounted(() => {
  //页面一挂载就获取首页数据
  reportDataStore.getReportData()
});
</script>

<style scoped>
.home {
  width: 100%;
  padding: 20px;
  background-color: #eee;
}
</style>
